//
//  CSTool.m
//  CSAaronSDK
//
//  Created by 黄楚升 on 2021/4/27.
//

#import "CSTool.h"

@implementation CSTool

+ (NSBundle *)shareBundle {
    static NSBundle *shareBundle = nil;
    if (shareBundle == nil) {
        shareBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"CSPublicSDK" ofType:@"bundle"]];
    }
    return shareBundle;
}

+ (UIImage *)imageWithName:(NSString *)name {
    
    NSBundle *bundle = [self shareBundle];
    UIImage *image = [UIImage imageWithContentsOfFile:[bundle pathForResource:name ofType:@"png"]];
    
    return image;
}

@end
